//
//  WJCPopBaseViewController.m
//  WJCLibrary
//
//  Created by wjc on 2022/9/3.
//

#import "WJCPopBaseViewController.h"

@interface WJCPopBaseViewController ()<UIPopoverPresentationControllerDelegate>

@end

@implementation WJCPopBaseViewController
//-(instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
-(instancetype)initWithPopWithXib:(NSString*)xibStr{
    if (self=[super init]) {
        if(xibStr){
            self =[super initWithNibName:xibStr bundle:[NSBundle mainBundle]];
        }
        self.modalPresentationStyle = UIModalPresentationOverCurrentContext;
        self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
        
        self.popoverPresentationController.delegate = self;
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
- (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller {
    return UIModalPresentationNone;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
